HttpManager

open class HttpManager @JvmOverloads constructor(userAgent: String, queryString: String? = null, proxyConfig: ProxyConfig? = null, customDns: Dns? = null, highTimeouts: Boolean = false, mirrorChooser: MirrorChooser = MirrorChooserRandom(), httpClientEngineFactory: HttpClientEngineFactory<*> = getHttpClientEngineFactory( customDns ))

Constructors

Link copied to clipboard
constructor(userAgent: String, queryString: String? = null, proxyConfig: ProxyConfig? = null, customDns: Dns? = null, highTimeouts: Boolean = false, mirrorChooser: MirrorChooser = MirrorChooserRandom(), httpClientEngineFactory: HttpClientEngineFactory<*> = getHttpClientEngineFactory( customDns ))

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
suspend fun get(request: DownloadRequest, skipFirstBytes: Long? = null, receiver: BytesReceiver)
Link copied to clipboard

Gets the InputStream for the given request as a DigestInputStream, so you can verify the SHA-256 hash. If you don't need to verify the hash, use getInputStream instead.

Link copied to clipboard
Link copied to clipboard
suspend fun head(request: DownloadRequest, eTag: String? = null): HeadInfo?

Performs a HEAD request and returns HeadInfo.

Link copied to clipboard
suspend fun post(url: String, json: String, proxy: ProxyConfig? = null)